const log4js = require('log4js');
const { log } = require('../config');
// 加载配置文件
log4js.configure(log);
const consoleLogger = log4js.getLogger('out');

const logUtil = {
  info: (message, args = '') => {
    consoleLogger.info(message, args);
  },
  debug: (message, args = '') => {
    consoleLogger.debug(message, args);
  },
  error: (message, err = '') => {
    consoleLogger.error(message, err);
  }
};

module.exports = logUtil;
